//
//  SwithSettingItem.m
//  zoneSun
//
//  Created by zy-gyl on 16/7/20.
//  Copyright © 2016年 Zeaple. All rights reserved.
//

#import "SwithSettingItem.h"

@implementation SwithSettingItem

+ (instancetype)switchSettingItemWithIcon:(NSString *)icon title:(NSString *)title isOn:(BOOL)isOn key:(NSString*)key;
{
    SwithSettingItem *item = [self settingItemWithIcon:icon title:title];
    NSNumber *isOnNum = [[NSUserDefaults standardUserDefaults]objectForKey:key];
    if(isOnNum){
        isOn = [isOnNum boolValue];
    }
    item.key = key;
    item.isOn = isOn;
    return item;
}

@end
